<?php
$fileID = $_POST['fileID'];
$db = new Database();

$getTag = $db->query("SELECT * FROM tag WHERE fileID = '$fileID'", "array");
    foreach($getTag as $fetch)
    {
        $statusColor = $fetch['statusBlink'];
        
        ?>
        <script type="text/javascript">
		setTimeout(function(){
			$("<div style='position:absolute;margin-left:10px;' class='tagList'><div class='configTag reconfigTag' id='configTag_<?php echo $fetch['id']; ?>' data-image-id='<?php echo $fetch['fileID']; ?>' data-tag-id='<?php echo $fetch['id']; ?>' style='border:2px solid #000;background-color: <?php echo substr($statusColor,0,strlen($statusColor)-4); ?>;opacity:0.4;color:white;cursor:pointer;top:<?php echo $fetch['top'] ?>px;left:<?php echo $fetch['getleft'] ?>px;position:absolute;width:<?php echo $fetch['width'] ?>px;height:<?php echo $fetch['height'] ?>px;'></div></div>").insertAfter(".imageTag");
		},500);
	</script>
        <?php
    }
$Getupload = $db->query("SELECT * FROM file WHERE fileID='$fileID'","array");
foreach($Getupload as $dateUploaded)
{
	//height="507"
	$image_Name = $dateUploaded['fileLocation'];

?>
<div class="titleBar">
	<div class="holderLeft">
	   <div class="titlePosition">
		Tag an information in to this image.
	   </div>
	</div>
	<div class="holderRight align_right">
		<div class="titlePosition">
			<div class="startTag cursor" data-image-id="<?php echo $dateUploaded['fileID']; ?>">Start Tagging</div>
			<div class="cancelstartTag cursor display" data-image-id="<?php echo $dateUploaded['fileID']; ?>">Cancel Tagging</div>
		</div>
        </div>
</div>
	<div class="Holdercontent">
		<div class="taggedAction" id="taggedAction_<?php echo $dateUploaded['fileID']; ?>" style="text-align: right;height: 50px;margin-top: 10px;"></div>
		
		
		<img src="<?php echo $dateUploaded['fileLocation']; ?>" data-cabinet-name="<?php echo $_POST['cabinetName']; ?>" class="imageTag fl_left" id="imageTag_<?php echo $dateUploaded['fileID']; ?>" width="680"  data-image-id="<?php echo $dateUploaded['fileID']; ?>" style="margin-left: 10px;"/>
		
	</div>
<?php

}
?>
